package com.cxf.windex.entity;

import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import javax.persistence.*;
import lombok.Data;

@Data
@Table(name = "b_shop")
public class BShop {
    /**
     * 店铺ID
     */
    @Id
    private Long id;

    /**
     * 真实姓名
     */
    @ApiModelProperty(value = "真实姓名")
    private String realname;

    /**
     * 店铺名称
     */
    @ApiModelProperty(value = "店铺姓名")
    private String name;

    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号码")
    private String phone;

    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID")
    private String wxopenid;

    /**
     * 微信号
     */
    @ApiModelProperty(value = "微信号")
    private String wx;

    /**
     * 微信头像
     */
    @ApiModelProperty(value = "微信头像")
    @Column(name = "wx_head_url")
    private String wxHeadUrl;

    /**
     * 地址
     */
    @ApiModelProperty(value = "地址")
    private String address;

    /**
     * 类型
     */
    @ApiModelProperty(value = "店铺类型")
    private String type;

    /**
     * 状态 0未认证 1正常
     */
    @ApiModelProperty(value = "状态 0未认证 1正常")
    private String status;

    /**
     * 经度
     */
    @ApiModelProperty(value = "经度")
    private String latitude;

    /**
     * 纬度
     */
    @ApiModelProperty(value = "纬度")
    private String longitude;

    /**
     * 创建时间
     */
    @Column(name = "crt_time")
    private Date crtTime;

    /**
     * 创建用户IP
     */
    @Column(name = "crt_host")
    private String crtHost;

    /**
     * 更新时间
     */
    @Column(name = "upd_time")
    private Date updTime;

    /**
     * 更新用户IP
     */
    @Column(name = "upd_host")
    private String updHost;
    @ApiModelProperty(value = "省")
    private String  provice;
    @ApiModelProperty(value = "市")
    private String  city;
    @ApiModelProperty(value = "区/县")
    private String  county;
    @ApiModelProperty(value = "乡镇")
    private String  town;

    @Transient
    private String statusDesc="正常";

    public void setStatus(String status){
        this.status=status;
        if(status.equals("0")){
            statusDesc="冻结";
        }
    }


}
